package org.example.system.dubbo;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import org.example.api.system.RemoteOperatorLogService;
import org.example.api.system.domain.bo.RemoteOperatorLogBo;
import org.example.common.core.utils.MapstructUtils;
import org.example.system.domain.bo.SysOperatorLogBo;
import org.example.system.service.ISysOperatorLogService;
import org.springframework.stereotype.Service;

@Slf4j
@Service
@DubboService
@RequiredArgsConstructor
public class RemoteOperatorLogServiceImpl implements RemoteOperatorLogService {

    private final ISysOperatorLogService operatorLogService;

    @Override
    public void saveLog(RemoteOperatorLogBo sysOperatorLog) {
        SysOperatorLogBo sysOperLogBo = MapstructUtils.convert(sysOperatorLog, SysOperatorLogBo.class);
        operatorLogService.insertOperlog(sysOperLogBo);
    }
}
